#!/bin/bash

host=$1
pass=$2

cpuinfo=`/usr/bin/sshpass -p readwrite ssh -p 4118 root@$host "cat /proc/meminfo"`
low_total=`echo "$cpuinfo"|awk '/LowTotal/ {print $2}'`
low_free=`echo "$cpuinfo"|awk '/LowFree/ {print $2}'`
low_mem=`expr $low_total - $low_free`

#echo "LowTotal: $low_total"
#echo "LowFree:  $low_free"
echo -n $low_mem
